package yogiro.to;

import java.util.List;

public class PictureTO {
	private int pictureNo;
	private List upPicture;
	private String pictureRoute;
	private int pictureGroup;
	public PictureTO(int pictureNo, List upPicture, String pictureRoute,
			int pictureGroup) {
		super();
		this.pictureNo = pictureNo;
		this.upPicture = upPicture;
		this.pictureRoute = pictureRoute;
		this.pictureGroup = pictureGroup;
	}
	public PictureTO(int pictureNo, String pictureRoute, int pictureGroup) {
		super();
		this.pictureNo = pictureNo;
		this.pictureRoute = pictureRoute;
		this.pictureGroup = pictureGroup;
	}
	
	public PictureTO(String pictureRoute, int pictureGroup) {
		super();
		this.pictureRoute = pictureRoute;
		this.pictureGroup = pictureGroup;
	}
	public PictureTO() {
		super();
	}
	public int getPictureNo() {
		return pictureNo;
	}
	public void setPictureNo(int pictureNo) {
		this.pictureNo = pictureNo;
	}
	public List getUpPicture() {
		return upPicture;
	}
	public void setUpPicture(List upPicture) {
		this.upPicture = upPicture;
	}
	public String getPictureRoute() {
		return pictureRoute;
	}
	public void setPictureRoute(String pictureRoute) {
		this.pictureRoute = pictureRoute;
	}
	public int getPictureGroup() {
		return pictureGroup;
	}
	public void setPictureGroup(int pictureGroup) {
		this.pictureGroup = pictureGroup;
	}
	@Override
	public String toString() {
		return "PictureTO [pictureNo=" + pictureNo + ", upPicture=" + upPicture
				+ ", pictureRoute=" + pictureRoute + ", pictureGroup="
				+ pictureGroup + "]";
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + pictureGroup;
		result = prime * result + pictureNo;
		result = prime * result
				+ ((pictureRoute == null) ? 0 : pictureRoute.hashCode());
		result = prime * result
				+ ((upPicture == null) ? 0 : upPicture.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		PictureTO other = (PictureTO) obj;
		if (pictureGroup != other.pictureGroup)
			return false;
		if (pictureNo != other.pictureNo)
			return false;
		if (pictureRoute == null) {
			if (other.pictureRoute != null)
				return false;
		} else if (!pictureRoute.equals(other.pictureRoute))
			return false;
		if (upPicture == null) {
			if (other.upPicture != null)
				return false;
		} else if (!upPicture.equals(other.upPicture))
			return false;
		return true;
	}
	
}